<template>
  <div>
    <h3>新闻列表</h3>
    <ul>
      <li>
        <router-link to="/news/100?name=zhangsan&age=10"
          >新闻详情100</router-link
        >
      </li>
      <li>
        <router-link
          :to="{
            // path: '/news/200',
            name: 'newsDetail',
            // params它只能和命名路由配置一起使用
            params: { id: 200 },
            query: { name: 'wuangwu', age: 20 }
          }"
          >新闻详情200</router-link
        >
      </li>
    </ul>
  </div>
</template>

<script>
export default {}
</script>

<style lang="scss" scoped></style>
